package com.nmc.service.manager;


import java.util.List;

import com.nmc.service.dao.HospitalDao;
import com.nmc.service.model.Hospital;


/**
 * Business Service Interface to handle communication between web and
 * persistence layer.
 */
public interface HospitalManager extends GenericManager<Hospital, Long> {
    /**
     * Convenience method for testing - allows you to mock the DAO and set it on an interface.
     * @param hospitalDao the HospitalDao implementation to use
     */
    void setHospitalDao(HospitalDao hospitalDao);

    /**
     * Retrieves a hospital by hospitalId.  An exception is thrown if hospital not found
     *
     * @param hospitalId the identifier for the hospital
     * @return Hospital
     */
    Hospital getHospital(String hospitalId);

    

    /**
     * Retrieves a list of all hospitals.
     * @return List
     */
    List<Hospital> getHospitals();

    /**
     * Saves a hospital's information.
     *
     * @param hospital the hospital's information
     * @throws HospitalExistsException thrown when hospital already exists
     * @return hospital the updated hospital object
     */
    Hospital saveHospital(Hospital hospital) ;

    /**
     * Removes a hospital from the database by their hospitalId
     *
     * @param hospitalId the hospital's id
     */
    void removeHospital(String hospitalId);


    List<Hospital> searchHospital(int zoneId,String query);
}
